{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# one-hot 编码实现\n",
    "将其转换为 0 和 1 组成的向量。举个例子，序列 [3, 5] 将会\n",
    "被转换为 10 000 维向量，只有索引为 3 和 5 的元素是 1，其余元素都是 0。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-02-22T08:54:40.637995Z",
     "start_time": "2021-02-22T08:54:40.386930Z"
    }
   },
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "def one_hot(seq, dim=10000):\n",
    "    results = np.zeros((len(seq), dim))\n",
    "    for i,s in enumerate(seq):\n",
    "        results[i][s] = 1\n",
    "    return results"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-02-22T02:10:46.039595Z",
     "start_time": "2021-02-22T02:10:46.035184Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[0., 1., 1., 0., 0., 0., 0., 0., 0., 0.],\n",
       "       [0., 0., 0., 1., 1., 0., 0., 0., 0., 0.],\n",
       "       [0., 0., 0., 1., 0., 1., 0., 0., 0., 0.]])"
      ]
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "one_hot([[1,2],[3,4],[3,5]], 10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-02-22T01:59:10.156812Z",
     "start_time": "2021-02-22T01:59:10.154421Z"
    }
   },
   "outputs": [],
   "source": [
    "my_list = ['a', 'b', 'c']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-02-22T01:59:24.837429Z",
     "start_time": "2021-02-22T01:59:24.833604Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0 a\n",
      "1 b\n",
      "2 c\n"
     ]
    }
   ],
   "source": [
    "for idx, val in enumerate(my_list):\n",
    "    print(idx, val)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-02-22T02:01:19.869973Z",
     "start_time": "2021-02-22T02:01:19.866071Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1 a\n",
      "2 b\n",
      "3 c\n"
     ]
    }
   ],
   "source": [
    "for idx, val in enumerate(my_list, 1):\n",
    "    print(idx, val)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "也可以对关键字参数color赋十六进制的RGB字符串如 color='#900302'\n",
    "\n",
    "    =============    ===============================\n",
    "    character        color\n",
    "    =============    ===============================\n",
    "    ``'b'``          blue 蓝\n",
    "    ``'g'``          green 绿\n",
    "    ``'r'``          red 红\n",
    "    ``'c'``          cyan 蓝绿\n",
    "    ``'m'``          magenta 洋红\n",
    "    ``'y'``          yellow 黄\n",
    "    ``'k'``          black 黑\n",
    "    ``'w'``          white 白\n",
    "    =============    ===============================\n",
    " 点型参数**Markers**,如：marker='+' 这个只有简写，英文描述不被识别\n",
    "=============    ===============================\n",
    "    character        description\n",
    "    =============    ===============================\n",
    "    ``'.'``          point marker\n",
    "    ``','``          pixel marker\n",
    "    ``'o'``          circle marker\n",
    "    ``'v'``          triangle_down marker\n",
    "    ``'^'``          triangle_up marker\n",
    "    ``'<'``          triangle_left marker\n",
    "    ``'>'``          triangle_right marker\n",
    "    ``'1'``          tri_down marker\n",
    "    ``'2'``          tri_up marker\n",
    "    ``'3'``          tri_left marker\n",
    "    ``'4'``          tri_right marker\n",
    "    ``'s'``          square marker\n",
    "    ``'p'``          pentagon marker\n",
    "    ``'*'``          star marker\n",
    "    ``'h'``          hexagon1 marker\n",
    "    ``'H'``          hexagon2 marker\n",
    "    ``'+'``          plus marker\n",
    "    ``'x'``          x marker\n",
    "    ``'D'``          diamond marker\n",
    "    ``'d'``          thin_diamond marker\n",
    "    ``'|'``          vline marker\n",
    "    ``'_'``          hline marker\n",
    "    =============    ===============================\n",
    "线型参数**Line Styles**，linestyle='-'\n",
    "\n",
    "    =============    ===============================\n",
    "    character        description\n",
    "    =============    ===============================\n",
    "    ``'-'``          solid line style 实线\n",
    "    ``'--'``         dashed line style 虚线\n",
    "    ``'-.'``         dash-dot line style 点画线\n",
    "    ``':'``          dotted line style 点线\n",
    "    =============    ===============================\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-02-22T02:48:24.802340Z",
     "start_time": "2021-02-22T02:48:24.799914Z"
    }
   },
   "outputs": [],
   "source": [
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-02-22T02:55:00.187585Z",
     "start_time": "2021-02-22T02:55:00.024397Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEWCAYAAABrDZDcAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAfRUlEQVR4nO3dfZwdZX338c+XsLCJJHBLFpLmgSBytwiaELYhERJSxAoYwbuFGh58gN5NV0ERrc++EBKpFR/AQEyKCIKglLsGCgg+VOEFkQbcQILEaI1JkJVNsgYJBIgm5Hf/MRN6PDlndzbZObO7832/XvM6M3NdZ+Z3rmTnd+aaOXMpIjAzs/Laq+gAzMysWE4EZmYl50RgZlZyTgRmZiXnRGBmVnJOBGZmJedEYAOWpJD02qLj6CuSpkv6ZdFx7ClJ75G0pOg4LDsnArN+IiIejIg/78ttSpqQJsy9+3K7Nrg4EVi/V4aDWJGfsQzta91zIrDdJukjkr5Tte5qSVel8/tL+rqkTkm/lfRZSUPSssMk/VjSJkm/k3SLpA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fRf48Z4yrk77GWvNvLj5gwMyu5wdg1ZGZmveBEYGZWck4EZmYl50RgZlZyTgRmZiXnRGBmVnJOBGYFSO9fN+sXnAjMeiBpniqe7y/pckkfkPQRST9Nnwl/WUX5HZKWKXnO/ZyK9VskzZX0MDCtwR/DrC4nArOefR14N4CkvUh++r8BOJzk8eKTgGMkzUjrnx8RxwCtwAckHZiufxXJ2ArHRsSSBsZv1q1B94gJs74WEeskbZJ0NHAw8Bjwl8Bfp/MA+5EkhgdIDv7/J10/Ll2/CXiZ5KFwZv2KE4FZNtcB7wFGAdcDbwI+FxH/WllJ0kySB5hNi4gXJd0PNKfFWyPi5QbFa5aZu4bMsrmd5DHFf0ny4MDvA+enz/9H0hhJBwH7A79Pk8BfkAwlaNav+YzALIOI+KOk+4Bn02/1P5B0BPBf6ZOKtwDnAt8D2iQ9DvwSWFpUzGZZ+emjZhmkF4kfBc6MiF8VHY9ZX3LXkFkPJL2O5NnvP3ISsMHIZwRmZiXnMwIzs5JzIjAzKzknAjOzknMiMDMrOScCM7OS+/9tzxpXRW2wnQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(range(5), [1,2,3,4,5], 'r*', label=\"what\")\n",
    "plt.title(\"year house price trend\")\n",
    "plt.xlabel(\"year\")\n",
    "plt.ylabel(\"house price\")\n",
    "plt.legend()\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-02-22T09:35:58.759080Z",
     "start_time": "2021-02-22T09:35:58.751832Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0\n",
      "0\n",
      "0\n",
      "0\n",
      "0\n",
      "1\n",
      "1\n",
      "1\n",
      "1\n",
      "1\n",
      "2\n",
      "2\n",
      "2\n",
      "2\n",
      "2\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "[None,\n",
       " None,\n",
       " None,\n",
       " None,\n",
       " None,\n",
       " None,\n",
       " None,\n",
       " None,\n",
       " None,\n",
       " None,\n",
       " None,\n",
       " None,\n",
       " None,\n",
       " None,\n",
       " None]"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "[print(j) for j in range(3) for i in range(5)]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-02-22T08:57:19.567502Z",
     "start_time": "2021-02-22T08:57:19.563740Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "None\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/Users/rex/anaconda3/envs/py37/lib/python3.7/site-packages/ipykernel_launcher.py:7: RuntimeWarning: invalid value encountered in true_divide\n",
      "  import sys\n"
     ]
    }
   ],
   "source": [
    "print(normalize([[3,2,3,1,4,5,3,3]]))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python [conda env:py37] *",
   "language": "python",
   "name": "conda-env-py37-py"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.9"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
